package com.example.a514;

import android.content.ComponentName;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;

import receiver.Vibrate;

public class VibrateBroadCast extends AppCompatActivity implements View.OnClickListener {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        EdgeToEdge.enable(this);
        setContentView(R.layout.activity_vibrate_broad_cast);

        findViewById(R.id.btn_sendVibrate).setOnClickListener(this);

    }
    public final  static  String SHOCK_ACTION = "com.lmt.gfgfg";

    @Override
    public void onClick(View v) {
        Vibrate vibrate = new Vibrate();
        ComponentName componentName = new ComponentName(this,"com.example.a514.receiver.Vibrate");
        Intent intent = new Intent(SHOCK_ACTION);
        intent.setComponent(componentName);
        sendBroadcast(intent);
    }
}